﻿namespace Cpuss
{
    /// <summary>
    /// Event data associated with <see cref="Process.Started"/>.
    /// </summary>
    public sealed class ProcessCompletedEventArgs : ProcessStartedEventArgs
    {
        private readonly int _completionTime;

        /// <summary>
        /// Initializes a new instance of <see cref="ProcessCompletedEventArgs"/>.
        /// </summary>
        /// <param name="id">Id of process (PID).</param>
        /// <param name="burstTime">Burst time of process.</param>
        /// <param name="arrivalTime">Arrival time of process.</param>
        /// <param name="priority">Priority of process.</param>
        /// <param name="startTime">Start time of process.</param>
        /// <param name="completionTime">Completion time of process.</param>
        public ProcessCompletedEventArgs(int id, int burstTime, int arrivalTime, Priority priority, int startTime,
                                         int completionTime)
            : base(id, burstTime, arrivalTime, priority, startTime)
        {
            _completionTime = completionTime;
        }

        /// <summary>
        /// Gets the completion time of the process.
        /// </summary>
        public int CompletionTime
        {
            get { return _completionTime; }
        }
    }
}